ActiveReports 8 > ActiveReports User Guide > How To > Page Report How To > Create Common Page Reports > Create Red Negatives Report |
A Red Negatives report shows negative values in red color if those values meet the requirements set in a conditional expression. The following steps demonstrate how to create a report with negative values in red negatives.
These steps assume that you have already added a Page Report template to your project, connected it to a data source and added a DataSet. See Adding an ActiveReport to a Project, Connect to a Data Source and Add a Dataset for more information.
=iif(Fields!FieldName.Value < 0, "Red", "Black")
Note: In the expression above, FieldName refers to field that the textbox contains. For example, if a textbox contains the Rollup field, the expression looks like: =iif(Fields!Rollup.Value < 0, "Red", "Black") |
The following image illustrates a report that contains negative values in red: